package heliotrope.game.system
{
	import heliotrope.net.loader.QueueLoader;

	public class LoadSystem
	{
		private static var __instance:LoadSystem;
		
		private var _queueLoader:QueueLoader;
		public function LoadSystem(pvt:PrivateClass)
		{
			_queueLoader = new QueueLoader(4,1);
		}
		
		public function get queueLoader():QueueLoader
		{
			return _queueLoader;
		}

		public static function init():void
		{
			if(LoadSystem.__instance)
			{
				throw new Error("You can't init the LoadSystem twice!")
			}
			LoadSystem.__instance = new LoadSystem(new PrivateClass);
		}
		
		public static function getInstance():LoadSystem
		{
			if(!LoadSystem.__instance)
			{
				throw new Error("You should init the LoadSystem at first!")
			}
			return LoadSystem.__instance;
		}
	}
}

class PrivateClass
{
	public function PrivateClass()
	{
	}
}